flushClass($("#class"));

function selectClass() {
    flushName($("#name"),{"classid":$("#class").val()});
    $("#name").change(selectStudent);
    selectStudent();
}

function selectStudent() {
    var json={"classid":$("#class").val(),"userid":$("#name").val(),"page":1}

    flushTable("http://139.199.200.112/dtpr/index.php?exam-teach-users-wrong",JSON.stringify(json),"#page",".table tbody");
}

function addLine(data) {
    var parent=$(".table tbody");
    parent.append($("<tr>\n" +
        "    <td>"+data.queue+"</td>\n" +
        "    <td>"+data.times+"</td>\n" +
        "    <td>"+data.subject+"</td>\n" +
        "    <td>"+data.volume+"</td>\n" +
        "    <td>"+data.section+"</td>\n" +
        "    <td>"+data.question+"</td>\n" +
        "</tr>"));
}